#include <stdio.h>
#include <string.h>

int main () {
    int x,y;
    char* operator;
    printf("请输入表达式：");
    scanf("%d%s%d", &x, operator, &y);
    printf("%d\n", x);
    printf("%s\n", operator);
    printf("%d\n", y);
    int res;
    if (strcmp(operator, "+") == 0) {
        res = x + y;
    }
    if (strcmp(operator, "-") == 0) {
        res = x - y;
    }
    if (strcmp(operator, "*") == 0) {
        res = x * y;
    }
    if (strcmp(operator, "/") == 0) {
        res = x / y;
    }
    printf("%d %s %d = %d", x, operator, y, res);
    return 0;
}  